function addRegister() {
    $("#mainForm").submit();
}
function deleteRegister(id) {
    if(confirm("确定删除？")) {
        $("#id").val(id);
        $("#mainForm").attr("action",$("#basePath").val() + "/register/deleteRegister/"+id);
        $("#mainForm").submit();
    }
}

function toUpdate(id) {
    $("#id").val(id);
    $("#mainForm").attr("action",$("#basePath").val() + "/register/selectRegister/"+id);
    $("#mainForm").submit();
}

function update() {
    $("#mainForm").submit();
}